package net.melon.plugin.core.interceptor;

import net.esj.basic.core.view.tools.ActionContext;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class ServletConfigInterceptor extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		ActionContext.setRequest(ServletActionContext.getRequest());
		ActionContext.setResponse(ServletActionContext.getResponse());
		return invocation.invoke();
	}

}
